function setCarmeraReal(){
	uni.setStorageSync('carmeraRealname', true);
}
function getCarmeraReal(){
	return uni.getStorageSync('carmeraRealname');
}
function setCarmeraRegister(){
	uni.setStorageSync('carmeraRegister', true);
}
function getCarmeraRegister(){
	return uni.getStorageSync('carmeraRegister');
}
function setCarmeraEdit(){
	uni.setStorageSync('carmeraEdit', true);
}
function getCarmeraEdit(){
	return uni.getStorageSync('carmeraEdit');
}

function setSettingPush(b){
	uni.setStorageSync('settingPush', b);
}
function getSettingPush(){
	return uni.getStorageSync('settingPush');
}

function setRegisterUser(user){
	uni.setStorageSync('registerUser', user);
}
function getRegisterUser(){
	return uni.getStorageSync('registerUser');
}

function setLogin(){
	uni.setStorageSync('login', true);
}
function getLogin(){
	return uni.getStorageSync('login');
}
function removeLogin(){
	uni.removeStorageSync('login');
}
function setToken(token){
	uni.setStorageSync('token', token);
}
function getToken(){
	return uni.getStorageSync('token');
}
function removeToken(){
	uni.removeStorageSync('token');
}

function setUserId(userId){
	uni.setStorageSync("userId", userId);
}
function getUserId(){
	return uni.getStorageSync("userId");
}
function setUserName(userName){
	uni.setStorageSync("userName", userName);
	// uni.$TUIKit.updateMyProfile({nick: userName}).then(res=>{
	// 	console.log("IM更新成功: " + JSON.stringify(res));
	// }).catch(res=>{
	// 	console.log("IM更新失败: " + JSON.stringify(res));
	// });
}
function getUserName(){
	return uni.getStorageSync("userName");
}
function setUserSex(userSex){
	uni.setStorageSync("userSex", userSex);
}
function getUserSex(){
	return uni.getStorageSync("userSex");
}
function setUserPic(userPic){
	uni.setStorageSync("userPic", userPic);
	// uni.$TUIKit.updateMyProfile({avatar: userPic}).then(res=>{
	// 	console.log("IM更新成功: " + JSON.stringify(res));
	// }).catch(res=>{
	// 	console.log("IM更新失败: " + JSON.stringify(res));
	// });
}
function getUserPic(){
	return uni.getStorageSync("userPic");
}
function setUserTxcode(userTxCode){
	uni.setStorageSync("userTxCode", userTxCode);
}
function getUserTxcode(){
	return uni.getStorageSync("userTxCode");
}
function setDistance(){
	return uni.getStorageSync("distance");
}
function getDistance(){
	let distanceList = uni.getStorageSync("distance");
	if(!distanceList){
		distanceList = []
	}
	return distanceList;
}
function setVip(b){
	uni.setStorageSync("vip", b);
}
function getVip(){
	return uni.getStorageSync("vip");
}



function setTicketOpen(vipManage){
	uni.setStorageSync('vipManage', vipManage);
}
function getTicketOpen(){
	return uni.getStorageSync("vipManage");
}

function setTicketOver(){
	uni.setStorageSync("ticketOver" + uni.getStorageSync('userId'), true)
}
function getTicketOver(){
	return uni.getStorageSync("ticketOver" + uni.getStorageSync('userId'));
}

function setOpenId(openId){
	uni.setStorageSync('openId', openId);
}
function getOpenId(){
	return uni.getStorageSync("openId");
}



export default {
	setLogin,
	getLogin,
	removeLogin,
	setToken,
	getToken,
	removeToken,
	
	setUserPic,
	getUserPic,
	setUserName,
	getUserName,
	setUserId,
	getUserId,
	setUserSex,
	getUserSex,
	setUserTxcode,
	getUserTxcode,
	setDistance,
	getDistance,
	setVip,
	getVip,
	
	setCarmeraReal,
	getCarmeraReal,
	setCarmeraRegister,
	getCarmeraRegister,
	setCarmeraEdit,
	getCarmeraEdit,
	
	setSettingPush,
	getSettingPush,
	
	setRegisterUser,
	getRegisterUser,
	
	setTicketOpen,
	getTicketOpen,
	setTicketOver,
	getTicketOver,
	
	setOpenId,
	getOpenId,
	
}